跳到主要内容

ngnix  php-fpm 配置

ngnix 的配置

server {
listen 80;
server_name bbs.kuwaedu.com kuwaedu.com;

#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;

root /mnt/disk/wwwroot/bbskuwaeducom;

location / {
index index.html index.htm index.php index.js;
}

#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
#fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; #127.0.0.1:9000;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}


php-fpm 设置

etc/php/7.4/fpm/pool.d/www.conf

;listen = /run/php/php7.4-fpm.sock
listen = 127.0.0.1:9000